(* Module interface LexForest *)

(* NAO ALTERE ESTE FICHEIRO!!
   Este ficheiro nao e' para submeter, mas o Mooshak
   usara' um ficheiro exactamente igual a este durante
   a compilacao.
*)

type word = char list ;;

type position = (string * int) ;;
type positions = position list ;;

type lexTree = LTree of char * positions * lexTree list ;;
type lexForest = lexTree list ;;

val none: positions
val somePos: position
val some: positions
val example: lexForest

val w : string -> word
val s : word -> string
val count : lexForest -> int
val validate : lexForest -> bool
val lengthN : int -> lexForest -> int
val retrieve : word -> lexForest -> positions
val insert : word -> position -> lexForest -> lexForest
val delete : word -> lexForest -> lexForest
val words : lexForest -> word list
val makeLex : word list -> lexForest
val first : lexForest -> word
val sucessor : word -> lexForest -> word
